Skip to content

Some deprecation warnings, formal and typo fixes#2505

Merged
Badiboy merged 4 commits into
eternnoir:masterfrom
Badiboy:master
Jul 31, 2025
Merged

Some deprecation warnings, formal and typo fixes#2505
Badiboy merged 4 commits into
eternnoir:masterfrom
Badiboy:master

Conversation

@Badiboy

@Badiboy Badiboy commented Jul 26, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

This comment was marked as outdated.

@Badiboy

Badiboy commented Jul 26, 2025

Copy link
Copy Markdown
Collaborator Author

#2384

ChatMemberXXX classes also redesigned.

@Badiboy Badiboy requested a review from Copilot July 26, 2025 12:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses deprecation warnings, formal improvements, and typo fixes across the codebase. The changes improve code quality by making abstract base classes explicit, adding proper constructor implementations, and cleaning up formatting issues.

  • Converts several base classes to proper Abstract Base Classes (ABC) with explicit constructors
  • Implements missing __init__ methods for ChatMember subclasses that previously used pass
  • Fixes test data and removes trailing whitespace/empty lines

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
tests/test_types.py Updates test data to use "left" status instead of "administrator" and removes trailing empty lines
telebot/types.py Makes base classes abstract, implements missing constructors, adds deprecation warnings, and improves code formatting
telebot/apihelper.py Adds explicit return statement and improves error handling with proper exception raising
Comments suppressed due to low confidence (2)

Comment thread telebot/apihelper.py
Comment thread telebot/types.py
Comment thread telebot/types.py
Comment thread telebot/types.py
Comment thread telebot/types.py
Comment thread telebot/types.py
Comment thread telebot/types.py
Comment thread telebot/types.py
Comment thread telebot/types.py
Comment thread telebot/types.py

@coder2020official coder2020official left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change self.class to type(self)

@coder2020official

Copy link
Copy Markdown
Collaborator

Otherwise lgtm

@Badiboy

Badiboy commented Jul 30, 2025

Copy link
Copy Markdown
Collaborator Author

@coder2020official

To be sure you saw it: #2505 (comment)

@coder2020official

Copy link
Copy Markdown
Collaborator

Yes, understood

@Badiboy Badiboy merged commit aabc0bf into eternnoir:master Jul 31, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants